package cn.zwx.activiti.example.common.enums;

/**
 * @description:
 * @projectName:activiti-example
 * @see:cn.zwx.activiti.example.common.enums
 * @author:zhangwenxue
 * @createTime:2021/5/29 11:11
 * @version:1.0
 */
public enum ErrorEnum {
    // 数据操作错误定义
    SUCCESS(200, "nice"),
    NO_PERMISSION(403,"你没得权限"),
    NO_AUTH(401,"你能不能先登录一下"),
    NOT_FOUND(404, "未找到该资源!"),
    INTERNAL_SERVER_ERROR(500, "服务器跑路了"),
    PARAMS_EMPTY_ERROR(99998,"参数不合法"),
    CREATE_DEFINITION_FAILED(100000,"部署工作失败"),
    GET_DEFINITION_XML_FAILED(100001,"获取流程定义的xml失败"),
    LOGIN_FAILED(100002,"登录失败请核对账号密码!"),
    START_INSTANCE_FAILED(100003,"启动工作流失败!"),
    RESUME_INSTANCE_FAILED(100004,"激活流程失败!"),
    SUSPEND_INSTANCE_FAILED(100005,"挂起流程失败!"),
    QUERY_VARIABLES_INSTANCE_FAILED(100006,"查询流程实例变量失败!"),
    DELETE_INSTANCE_FAILED(100007,"删除流程实例失败!"),
    TASKS_IMAGE_INSTANCE_FAILED(100008,"获取流程实例图片失败!"),
    NOT_FOUND_TASK_FAILED(100009,"未查询到任务信息!"),
    PROCESS_INSTANCE_ID_IS_EMPTY(100010,"流程实例id不能为空!"),
    ;

    /** 错误码 */
    private Integer errorCode;

    /** 错误信息 */
    private String errorMsg;

    ErrorEnum(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public Integer getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

}
